package avicit.bdp.dds.api.controller;

import avicit.bdp.dds.api.service.PlatformSyncService;
import avicit.platform6.core.rest.msg.ResponseMsg;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Api(tags = "同步平台用户信息服务")
@RequestMapping("/api/bdp/dds/platformSync")
public class PlatformSyncRest {
    @Autowired
    private PlatformSyncService platformSyncService;

    @ApiOperation(value = "全量同步")
    @PostMapping("/sync")
    public ResponseMsg<String> sync() {
        ResponseMsg<String> responseMsg = new ResponseMsg<>();
        platformSyncService.sync();
        return responseMsg;
    }
}
